Using a forward log storage and backward log storage to recover a storage to a forward or backward point-in-time

ABSTRACT

Provided are a computer program product, system, and method for using a forward log storage and backward log storage to recover a storage to a forward or backward point-in-time. In response to receiving writes to source data after establishing point-in-time copies, point-in-time data of the source data is copied to a backward log storage storing point-in-time data for multiple of the point-in-time copies. The point-in-time data in the backward log storage is applied to a recovery source data to roll-back the source data to a backward point-in-time of one of the point-in-time copies. Before applying the point-in-time data from the backward log storage, point-in-time data in the recovery source data, is copied to a forward log storage. The point-in-time data in the forward log storage is applied to the recovery source data to roll forward the recovery source data to a forward point-in-time subsequent to the backward point-in-time.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a computer program product, system, andmethod for using a forward log storage and backward log storage torecover a storage to a forward or backward point-in-time.

2. Description of the Related Art

In a storage environment, a storage controller may create point-in-time(“PiT”) copies of a production volume using point-in-time copytechniques, such as the IBM FlashCopy® (FlashCopy is a registeredtrademark of IBM), snapshot, etc. A point-in-time copy replicates datain a manner that appears instantaneous and allows a host to continueaccessing the source volume while actual data transfers to the copyvolume are deferred to a later time. The point-in-time copy appearsinstantaneous because complete is returned to the copy operation inresponse to generating the relationship data structures without copyingthe data from the source to the target volumes. Point-in-time copytechniques typically defer the transfer of the data in the source volumeat the time the point-in-time copy relationship was established to thecopy target volume until a write operation is requested to that datablock on the source volume. Data transfers may also proceed as abackground copy process with minimal impact on system performance. Thepoint-in-time copy relationships that are immediately established inresponse to the point-in-time copy command include a bitmap or otherdata structure indicating the location of blocks in the volume at eitherthe source volume or the copy volume. The point-in-time copy comprisesthe combination of the data in the source volume and the data to beoverwritten by the updates transferred to the target volume.

When an update to a block in the source volume involved in apoint-in-time copy relationship is received, the copy of the track as ofthe point-in-time must be copied to a side file or the target volumebefore the new data for the track is written to the source volume,overwriting the point-in-time copy of the data.

If the data in the source volume becomes corrupted or invalid, thatcorruption is also mirrored to the mirror copy, which may comprise apoint-in-time copy, such that both versions of the data have beencorrupted at this point. The point-in-time copies may be used asrecovery points to try to recover the source volume to a point where thedata has no corruption. However, it can be cost prohibitive to maintainnumerous point-in-time copies to allow recovery to a closestpoint-in-time where there was valid data prior to being corrupted.

SUMMARY

Provided are a computer program product, system, and method for using aforward log storage and backward log storage to recover a storage to aforward or backward point-in-time. A plurality of point-in-time copiesof source data in a source storage at different point-in-times areestablished. In response to receiving writes to the source data afterestablishing the point-in-time copies, point-in-time data of the sourcedata is copied, before being updated by the received writes, to abackward log storage, wherein the backward log storage storespoint-in-time data for multiple of the point-in-time copies. Thepoint-in-time data in the backward log storage is applied to a recoverysource data to roll-back the source data to a backward point-in-time ofone of the point-in-time copies. Before applying the point-in-time datafrom the backward log storage, point-in-time data in the recovery sourcedata, to be updated by the point-in-time data from the backward logstorage, is copied to a forward log storage. The point-in-time data inthe forward log storage is applied to the recovery source data to rollforward the recovery source data to a forward point-in-time subsequentto the backward point-in-time.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an embodiment of a storage environment.

FIG. 2 illustrates an embodiment of point-in-time copy information.

FIG. 3 illustrates an embodiment of a backward or forward log entry inlog storage.

FIG. 4 illustrates an embodiment of an entry in recovery metadata.

FIG. 5 illustrates an embodiment of operations to generate apoint-in-time copy of a source data.

FIG. 6 illustrates an embodiment of operations to process a write to thesource data while there is an active point-in-time copy.

FIGS. 7a and 7b illustrate an embodiment of operations to roll-back thesource data to a backward point-in-time.

FIG. 8 illustrates an embodiment of operations to roll-forward thesource data to a forward point-in-time.

FIGS. 9a and 9b illustrate an embodiment of operations to iterativelyperform roll-back and roll-forward operations of source data to apoint-in-time having valid data.

FIG. 10 illustrates a computing environment in which the components ofFIG. 1 may be implemented.

DETAILED DESCRIPTION

Described embodiments provide techniques for maintaining information onpoint-in-time data for different point-in-time copies of source data,such as volumes, that may be used to roll-back and roll-forward thesource volume to a backward and forward point-in-time of a point-in-timecopy. The described embodiments may be used to form recovery sourcedata, or recovery volumes, comprising the source data as of a previouspoint-in-time of one of the point-in-time copies that has valid data inthe event the source volume has corrupted or invalid data. After rollingback the recovery volume to a backward point-in-time, the recoverysource may be rolled forward to a forward point in time. Therolling-back and rolling-forward operations may be performed to findrecovery source data having valid data as of a most currentpoint-in-time at which there is valid data.

In described embodiments, point-in-time data from source data for anactive point-in-time copy is copied to a backward log storage, whichstores point-in-time data for multiple of the point-in-time copies whenthey are active. The backward log storage may be used to roll-back thesource data to a selected backward point-in-time of one of thepoint-in-time copies. Before rolling-back source data, the point-in-timedata for the source data may be stored in a forward log storage to useto roll forward the source data after rolling-back the source data.

FIG. 1 illustrates an embodiment of a data storage environment having astorage controller 100 managing access to a source storage 102 thatincludes source volumes 104 _(i), such as a production volume used bydifferent host systems 106, and a target storage 108. The volumes 104_(i) are comprised of extents 110 of contiguous tracks. A host system106 includes a point-in-time copy manager program 112 to establishpoint-in-time copies at the storage controller 100, such as FlashCopy,snapshot, etc. The storage controller 100 and hosts 106 may communicateover a network 114.

The storage controller 100 includes a point-in-time copy manager 116 tocreate point-in-time copies of data in the source storage 102, e.g.,FlashCopy, snapshot, etc. When creating a point-in-time copy, thepoint-in-time copy manager 116 generates point-in-time copy information200 on the point-in-time copy created as of a point-in-time. The storagecontroller 100 further includes an operating system 118, including thecode and logic to manage Input/Output (“I/O”) requests to the sourcestorage 102. The operating system 118 may configure the source storage102 and target storage 108 in one or more volumes 104 _(i) and data,such as tracks or logical block addresses (LBAs), grouped in extents.Extents 110 may comprise any grouping of tracks or data units instorage. The point-in-time copy manager 116 may be a copy servicesupplied with the operating system 118.

When a data location, such as a track, in a source storage, e.g.,volume, in an active point-in-time copy relationship identified in thepoint-in-time copy information 200 is subject to a write request, thepoint-in-time copy manager 116 copies the current data at the track,referred to as the point-in-time data, to a backward log storage 300_(B) in the target storage 108. Only after copying the point-in-timedata to the backward log storage 300 _(B) may the write data be appliedto the source storage 102 location, so that the log storage preservesthe point-in-time data for that source data location. The point-in-timecopy manager 116 may maintain a backward log storage pointer 120 _(B)that addresses a next location in the backward log storage 300 _(B) atwhich to write point-in-time data about to be updated. In certainembodiments, the backward log storage 300 _(B) may sequentially storepoint-in-time data across multiple point-in-time copy 200 relationships.

A recovery manager 122 may perform a recovery operation to roll-back thedata in the source data to a point-in-time of one of the point-in-timecopies 200. The recovery manager 122 may use backward recovery metadata400 _(B) that provides information on point-in-time data in the backwardlog storage 300 _(B) for point-in-time copies 200 to roll-back thesource. The recovery manager 122 may generate a recovery point-in-timecopy 200 _(R) to reconstruct data from the backward log storage 300 _(B)for a point-in-time at which to restore or roll-back the source volume.The recovery manager 122 may store point-in-time data for a recoverypoint-in-time copy 200 _(R) in a recovery volume 130, also referred toas recovery source data, recovery source storage, in the target storage108, separate from the backward log storage 300 _(B).

Before rolling-back data in the recovery volume 130 using the backwardlog storage 300 _(B), the recovery manager 122 may store the currentpoint-in-time data in the recovery volume 130 to a forward log storage300 _(F). The recovery manager 122 may use forward recovery metadata 400_(F) that provides information on point-in-time data in the forward logstorage 300 _(F) for point-in-time copies 200 to roll-forward data inthe recovery volume 130 to a forward point-in-time, to roll-forward andreverse the changes made by the roll-back operations. Multipleiterations of intermixed roll-forward and roll-back operations may beperformed on the recovery volume 130 to reach a desired point-in-time.

The recovery manager 122 may maintain a forward log storage pointer 120_(F) that addresses a next location in the forward log storage 300 _(F)at which to write point-in-time data about to be updated during aroll-back operation. In certain embodiments, the forward log storage 300_(F) may sequentially store point-in-time data across multiplepoint-in-time copy 200 relationships.

The storages 102 and 108 may comprise different types or classes ofstorage devices, such as magnetic hard disk drives, solid state storagedevice (SSD) comprised of solid state electronics, EEPROM (ElectricallyErasable Programmable Read-Only Memory), flash memory, flash disk,Random Access Memory (RAM) drive, storage-class memory (SCM), etc.,Phase Change Memory (PCM), resistive random access memory (RRAM), spintransfer torque memory (STM-RAM), conductive bridging RAM (CBRAM),magnetic hard disk drive, optical disk, tape, etc. The volumes 104 anlog storage 300 may further be configured from an array of devices, suchas Just a Bunch of Disks (JBOD), Direct Access Storage Device (DASD),Redundant Array of Independent Disks (RAID) array, virtualizationdevice, etc. Further, the storages 102 and 108 may compriseheterogeneous storage devices from different vendors and different typesof storage devices, such as a first type of storage devices, e.g., harddisk drives, that have a slower data transfer rate than a second type ofstorage devices, e.g., SSDs.

The network 114 may comprise a network such as one or moreinterconnected Local Area Networks (LAN), Storage Area Networks (SAN),Wide Area Network (WAN), peer-to-peer network, wireless network, etc.

The point-in-time copy manager 116 performs a point-in-time copyoperation that creates a copy of specified extents in a manner thatappears instantaneous and allows a process to continue accessing theextents subject to the point-in-time copy while actual data transfers ofthe copied data are deferred to a later time. The point-in-time copyappears instantaneous because complete is returned to the copy operationin response to generating the relationship data structures, such as thepoint-in-time copy information 200 and change recording information,without copying the data.

In FIG. 1, the point-in-time copy managers 112, 116 and recovery manager122 are shown as implemented in separate computing systems, a host 106and storage controller 100. In alternative embodiments, thepoint-in-time copy managers 112, 116 and recovery manager 122 may beimplemented on a same computer system and operating system. Stillfurther, the point-in-time copy managers 112, 116 and recovery manager122 may be modules within a single deployed computer program installedon a single computer system/operating system.

FIG. 2 illustrates an instance of the point-in-time copy information 200_(i), also referred to as a point-in-time copy, and may include: apoint-in-time copy identifier 202 providing a unique identifier of apoint-in-time copy; source data 204, indicating a division of sourcestorage 102 subject to a point-in-time copy operation, such as a volume104 _(i), data set, range of extents, etc.; target data 206 indicatingwhere the point-in-time data is copied, which may comprise the backwardlog storage 300 _(B), a recovery volume 130, volume or other division inthe target storage 108; a point-in-time 208 of the point-in-time copy202, such that source data 204 for the point-in-time copy 200 _(i) isconsistent as of that point-in-time 208; change recording information210 indicating which data or tracks in the source data 204 has changedsince the point-in-time 208, which may comprise a bitmap having a bitfor each data unit (e.g., track) that is set to one of two valuesindicating the data or track represented by the bit has or has not beenupdated since the point-in-time 208; and an active status 212 indicatingwhether the point-in-time copy 202 is active and still recording changesmade to the source data 204. The point-in-time copy managers 112, 116may generate numerous point-in-time copies 200 _(i) for the source data204 at different points-in-time, such as at scheduled time intervals.

FIG. 3 illustrates an instance of a log entry 300 _(i) in the forwardlog storage 300 _(F) and the backward log storage 300 _(B) forpoint-in-time data copied from the source data 204 for one of aplurality of point-in-time copies of the source data 204, and mayinclude: a log entry identifier (ID) 302 providing a unique identifierof the entry in the backward 300 _(B) or forward 300 _(F) log storage; apoint-in-time copy identifier 302 of the point-in-time copy 200 _(i) forwhich the point-in-time data is intended, which comprises thepoint-in-time copy ID 202; source data 306, e.g., volume 104 _(i), andsource data location 308, e.g., track in the volume 306, from which thepoint-in-time data was copied; and the point-in-time data 310. In thisway, the log entry 300 _(i) includes metadata on the point-in-time dataas well as the actual data 310. Alternatively, a pointer to thepoint-in-time data may be included.

In described embodiments, the backward 300 _(B) and forward 300 _(F) logstorages sequentially store point-in-time data from multiplepoint-in-time copies to optimize the storage of the point-in-time databy consolidating in a log storage location the data from multiplepoint-in-time copies. Further, consolidating point-in-time data in thelog storages 300 _(B), 300 _(F) reduces wasted space and allows for thestorage of many more point-in-time copies than would be possible if aseparate volume was required to store the point-in-time data for thepoint-in-time copies.

FIG. 4 illustrates an embodiment of an instance of a recovery metadataentry 400 _(i) in the backward 400 _(B) and forward 400 _(F) recoverymetadata 400 added for a point-in-time copy for use by the recoverymanager 122, and includes: an entry ID 402 providing a unique identifierof the entry in the recovery metadata 400; a point-in-time copy ID 404of the point-in-time copy for which the recovery metadata 402 isprovided; a point-in-time 406 of the point-in-time copy 404; a startlocation in the log storage 408 at which point-in-time data for thepoint-in-time copy 404 is written sequentially; and an end location inthe log storage 410 of the last written point-in-time data for thepoint-in-time copy 404. In certain embodiments, all the point-in-timedata (log entries 300 _(i)) for a point-in-time copy 404 are writtensequentially from the start location 408 through the end location 410.In this way, the recovery metadata entry 400 _(i) for each point-in-timecopy identifies where in the log storage 300 the log entries 300 _(i) ofpoint-in-time data for the point-in-time copy 404 are stored.

FIG. 5 illustrates an embodiment of operations performed by the storagecontroller point-in-time copy manager 116 to generate a point-in-timecopy 200 _(i) for a source storage 102, such as one or more volumes 104_(i). The point-in-time copy manager 116 may perform the operations ofFIG. 5 in response to a command from the host point-in-time copy manager112, automatically according to a schedule, or activated by some othermeans. Upon initiating (at block 500) an operation to generate apoint-in-time copy 200 _(i) for indicated source data, e.g., volume 104_(i), the point-in-time copy manager 116 generates (at block 502) changerecording information 210 indicating the tracks in the specified sourcedata to copy. The point-in-time copy manager 116 generates (at block504) point-in-time copy information 200 _(i) indicating thepoint-in-time copy identifier 202, the source data 204, e.g., volume,subject to the copy, a current point-in-time 208 at which the copy isbeing created, and the generated change recording information 210.

The point-in-time copy manager 116 adds (at block 506) an entry 400 _(i)to the backward recovery metadata 400 _(B) for the establishedpoint-in-copy 200 _(i) time indicating an identifier 402 for the addedentry 400 _(i), the point-in-time copy identifier 202 of the establishedpoint-in-time copy 200 _(i) in field 404, the point-in-time 208 of thepoint-in-time copy 200 _(i) in field 406; and set the start log location408 to the next location in the log storage at which to start copyingpoint-in-time data for the established point-in-time copy 202, which maycomprise the location addressed by the backward log storage pointer 120_(B). The end location 410 in the entry 400 _(i-1) preceding the entrybeing added 400 _(i), i.e., for the immediately preceding point-in-timecopy 200 _(i-1), may be set (at block 508) to indicate the log storagelocation immediately preceding the start location 408 of the new entry400 _(i) (e.g., location prior to that addressed by the backward logstorage pointer 120 _(B)). In an alternative embodiment, the endlocation 410 may be updated whenever a new log entry 300 _(i) is addedto the log storage 300. The current active point-in-time copy 200 _(i-1)is indicated (at block 510) as inactive in status field 212 toinactivate the current active point-in-time copy 200 _(i-1), and thejust created point-in-time copy 200 _(i) is indicated as active instatus field 212 of the newly created point-in-time copy 200 _(i).

With the operations of FIG. 5, when establishing a new point-in-timecopy 200 _(i), an entry is also added to the backward recovery metadata400 _(B) that provides information on the point-in-time data in thebackward log storage 300 _(B) for a point-in-time copy 200 _(i) that maybe used during roll-back operations on the source data. Further, thebackward recovery metadata 400 _(B) entries are in order in which thepoint-in-time copies 200 _(i) identified by the entries 400 _(i) areadded. This allows the backward recovery metadata 400 _(B) to determinethe ordering of the point-in-time copies according to theirpoints-in-time that may be selected to roll-back the source storage 102volumes 104 _(i) to the point-in-time of one of the point-in-time copies200.

FIG. 6 illustrates an embodiment of operations performed by theoperating system 118, and/or another component such as the point-in-timecopy manager 116, to handle a write request to the source storage 102while there is an active point-in-time copy 200 _(i). Upon receiving (ablock 600) a write from a host 106 to one of the tracks in an extent 110to update data, the operating system 118 determines (at block 602)whether the target data 206 for the active point-in-time copy 200 _(i)is a log storage 300, a recovery volume 130 or other target volume ordata division. If (at block 602) the target data 206 is the log storage300, then the operating system 118 creates (at block 604) a backward logentry 300 _(i) for the received write indicating an identifier 302 ofthe created entry the point-in-time copy ID 304 of the activepoint-in-time copy 200 _(i), the source data 306, e.g., volume, thesource data location 308, e.g., track, that is being updated in thesource data 306, and the point-in-time data 310 for the source locationto which the write is directed. The created log entry 300 _(i) iswritten (at block 606) to the backward log storage 300 _(B) at a nextsequential log storage location, such as identified by the backward logstorage pointer 120 _(B). The operating system 118 updates (at block608) the backward log storage pointer 120 _(E) to point to a nextsequential storage location following the storage location at which thecreated log entry 300 _(i) is written. The received write is thenapplied (at block 610) to the source data location 308 in the sourcedata 306, as the point-in-time data has been copied to the log storage300 in a separate target storage 108. The change recording information210 for the point-in-time copy is updated (at block 612) to indicatethat the source data location (e.g., track) is updated.

If (at block 602) the target storage 206 of the active point-in-timecopy 200 _(i) is not a log storage 300, such as is a recovery volume 130when the active point-in-time copy comprises the recovery point-in-timecopy 200 _(R), then the operating system 118 copies (at block 614) thepoint-in-time data to be overwritten from the source data 204 to theidentified target data 206, e.g., recovery volume 130. Control thenproceeds to block 610 to complete the write.

FIGS. 7a and 7b illustrate an embodiment of operations performed by therecovery manager 122 to restore the source data, such as a volume 104_(i), to a point-in-time of a point-in-time copy 200 _(i). Uponinitiating (at block 700) an operation to roll-back the source data 204to a previous point-in-time, the recovery manager 122 receives (at block702) selection of a backward point-in-time of one of a selectedpoint-in-time copies 200 _(S), less than the current point-in-time. Therecovery manager 122 creates (at block 704) a recovery point-in-timecopy 200 _(R) indicating the source data 204 to be rolled-back, aconfigured recovery volume as the target data 206 (having data locationscorresponding to the source data 204 locations), change recordinginformation 210 indicating locations in the source data 204 to recover,and having the active status 212 to indicate that the recoverypoint-in-time copy 200 _(R) is active. A loop of operations is performedat block 706 through 722 for each point-in-time copy 200 _(i) from themost recent point-in-time copy 200 _(N) indicated in the last entry 400_(N) in the recovery metadata 400 through the selected backwardpoint-in-time copy 200 _(S).

An entry 400 _(i) is added (at block 702) to the forward recoverymetadata 400 _(F) for the point-in-time copy 200 _(i) to roll back,indicating the entry identifier 402, point-in-time copy 200 _(i) 404identifier, the point-in-time 406 of the point-in-time copy 200 _(i),and set the start location 408 in the forward log storage 300 _(F) tothe location in the forward log storage 300 _(F) at which to startcopying point-in-time data for the point-in-time (e.g., log storagepointer). The end location 410 for the preceding entry 400 _(i-1) in theforward recovery metadata 400 _(F) is set (at bock 710) to indicate theforward log storage location immediately preceding the start location408 of the new entry 400 ₁ (e.g., location prior to forward log storagepointer 120 _(F)).

For the backward log entries 300 _(i) from the end location 410 to thestart location 408 in the backward log storage indicated in the entry400 _(i) in the backward recovery metadata 400 _(B) for point-in-timecopy 200 _(i), determine the data locations in the recovery volume 130,e.g., tracks, logical block addresses, etc., corresponding to the sourcedata locations indicated in the backward log storage entries 300 _(i)that will be rolled-back. For each determined data location in therecovery volume 130 to roll-back, create a forward log entry 300 _(i)indicating the point-in-time copy ID 304 of the point-in-time copy 200_(i), the source data 306, the source data location 308 being updated,and the point-in-time data 310 in the recovery volume 130 for the sourcedata location to be rolled-back before being rolled back.

Control proceeds to block 716 in FIG. 7b to write each created forwardlog entry 300 _(i) to the forward log storage 300 _(F) at a nextsequential log storage location, such as identified by the forward logstorage pointer 120 _(F), which is incremented after writing the entry300 _(i). For the backward log entries 300 _(i) from the end location410 to the start location 408 in the backward log storage 300 _(B)indicated in the entry 400 _(i) in the backward recovery metadata 400_(B) for the point-in-time copy 200 _(i) being processed, the recoverymanager 122 sequentially applies (at block 718) the point-in-time datafrom the backward log entries 300 _(i) to the data locations in therecovery volume 130 corresponding to the source data locations 308,indicated in the backward log entries 300 _(i), to roll-back therecovery volume 130. The change recording information 210 for therecovery point-in-time copy 200 _(R) is updated (at block 720) toindicate that the data locations of the recovery point-in-time copy 200_(R), that were written to the recovery volume 130, have been updated.After building the recovery volume 130, for the recovery point-in-timecopy 200 _(R), with the point-in-time data as of the selected backwardpoint-in-time to restore, the recovery manager 122 sets (at block 724)the point-in-time 208 of the recovery point-in-time 200 _(R) to thebackward point-in-time to which the data is rolled back.

With the operations of FIGS. 7a and 7b , the forward log storage 300_(F) is created while rolling-back the recovery volume 130 so that thedata overwritten in the recovery volume 130 as part of a roll-backoperation is saved in the forward log storage 300 _(F) to later undo thechanges of the roll back to roll forward the rolled-back recovery volume130. Further, the change recording information 210 for the recoverypoint-in-time copy 200 _(R) is updated to indicate that thepoint-in-time data for source data locations written from the logstorage 300 to the recovery volume 130 have been updated. This wouldprevent the operating system 118 from copying point-in-time data to beupdated from the source data in the source storage 102 to the recoveryvolume 130 to overwrite data copied from the forward 300 _(F) andbackward 300 _(B) log storage because the change recording information210 indicates the point-in-time data has already been applied as aresult of the copying of the point-in-time data from the log storages300 _(B), 300 _(F). This ensures that the point-in-time data from theforward 300 _(F) and backward 300 _(B) log storages written to therecovery volume 130 is not overwritten by point-in-time data at thesource storage 102 that is subsequently updated. Further, with theoperations of FIGS. 7a and 7b , all of the point-in-time data as of therestore point-in-time is staged in the recovery volume 130 before beingapplied to the source data 204 of the recovery point-in-time copy 200_(R). Once the point-in-time data in the recovery volume 130 is appliedto the source data 204, the source data, e.g., volume, is restored tothe recovery point-in-time.

In an alternative embodiment, the point-in-time data from the logstorage 300 may be directly applied to the source data 104 _(i) in thesource storage 102 without using a recovery point-in-time copy 200 _(R)of the source data. However, the advantage of the recovery point-in-timecopy 200 _(R) is that it allows user to continue to access to the sourcedata 104 _(i) while the point-in-time data is being recovered.

FIG. 8 illustrates an embodiment of operations performed by the recoverymanager 122 to roll-forward the recovery volume 130 using the forwardlog storage 300 _(F). Upon initiating (at block 800) an operation toroll-forward the recovery volume 130 to a subsequent point-in-time tocurrent point-in-time of recovery volume 300, the recovery manager 122receives (at block 804) selection of a forward point-in-time of aforward point-in-time copy in the forward recovery metadata entry 400_(i) in the forward recovery metadata 400 _(F) at which to roll forwardthe recovery volume 130. For each point-in-time copy 200 _(i), from themost recent point-in-time copy 200 _(i) in the forward recovery metadata400 _(i) to the selected forward point-in-time copy 200 _(i), therecovery manager 122, in sequential reverse order, performs theoperation at block 806. At block 806, for the log entries 300 _(i) fromthe end location 410 to the start location 408 in the forward logstorage 300 _(F) indicated in the entry 400 _(i) in the forward recoverymetadata 400 _(F) for the point-in-time copy 200 _(i), the recoverymanager sequentially applies (at block 806) the point-in-time data todata locations in the recovery volume 130 corresponding to the sourcedata locations indicated in the forward log storage entry 300 _(i).

After applying the point-in-time data from the forward log storage 400_(F) to roll the recovery volume 130 forward, the forward log storage300 _(F) may be cleared (at block 810) of entries 300 _(i) used in therolling forward. The point-in-time 208 of the recovery point-in-time 200_(R) is set (at block 812) to the forward point-in-time to which thedata is rolled forward.

FIGS. 9a and 9b illustrate an embodiment of operations performed by therecovery manager 122 or some other component to iteratively roll therecovery volume 130 forward and backward to different point-in-times toan estimated most current point-in-time at which there is valid in theevent the source volume 14 has invalid or corrupt data. Upon initiating(at block 900) operations to iteratively perform roll-back and rollforward operations to a previous or subsequent point-in-time havingvalid data, the recovery manager 122 sets (at block 902) a last invalidpoint-in-time copy to the point-in-time copy 404 in the last (mostrecent) entry 400 _(N) in the backward recovery metadata 400 _(B) and alast valid point-in-time copy to the point-in-time copy 404 in the firstor oldest entry 400 ₁ in the backward recovery metadata 400 _(B), wherethere are N entries in the backward recovery metadata 400 _(B).

The recovery manager 122 selects (at block 904) a recovery point-in-timeas a point-in-time of a point-in-time copy between the last valid andlast invalid point-in-time copies. The recovery manager 122 performs (atblock 906) the operations in FIGS. 7a and 7b to generate a recoverypoint-in-time copy 200 _(R) and recovery volume 130 for the selectedrecovery point-in-time. The recovery manager 122 may process (at block908) the recovery volume 130 point-in-time data along with unchangeddata in the source storage 102 to determine if the recovery volume 130has valid data, or is not corrupt. Error correction and data validationalgorithms known in the art may be used to determine whether therecovery volume 130 is valid or corrupt. To perform further iterationsto estimate the point-in-time copy having the most current valid data,the recovery manager 122 may perform the operations at block 910 et seq.

If (at block 910) the recovery volume 130 does not have valid data, thenthe last invalid point-in-time copy is set (at block 912) to thepoint-in-time copy 200 _(i) for the selected recovery point-in-time. Therecovery manager 122 determines (at block 914) whether there any entries400 _(i) in the backward recovery metadata 400 _(B) having apoint-in-time copy 406 between the entries for the last valid and lastinvalid point-in-time copies. If there are further potential entries toconsider, then the recovery manager 122 selects (at block 918) abackward point-in-time of a point-in-time copy 200 _(i) between the lastvalid and last invalid point-in-time copies and performs (at block 920)the operations at blocks 706-724 in FIGS. 7a and 7b to roll back therecovery volume 130 to the selected backward point-in-time, and thenback to block 908 to process the recovery volume 130.

If (at block 914) there are no further entries in the backup recoverymetadata 400 _(B) between the last valid and last invalid point-in-timecopies, then the last valid point-in-time copy 200 _(i) is returned (atblock 916) to use for the recovery volume 130.

If (at block 910) the recovery volume 130 has valid data, then controlproceeds to block 922 in FIG. 9b to perform a roll-forward operation. Atblock 922, the last valid point-in-time copy is set to the selectedpoint-in-time copy. If (at block 924) there any entries 400 _(i) in theforward recovery metadata 400 _(F) having a point-in-time copy 406between the entries for the last valid and last invalid point-in-timecopies, then the recovery manager 122 selects (at block 928) a forwardpoint-in-time of a point-in-time copy 200 _(i) between the last validand last invalid point-in-time copies and performs (at block 930) theoperations at blocks 804-812 in FIG. 8 to roll forward the recoveryvolume 130 to the selected forward point-in-time, and then back to block910 in FIG. 9a to further process the recovery volume 130. If (at block924) there are no further entries in the forward recovery metadata 400_(B) between the last valid and last invalid point-in-time copies, thenthe last valid point-in-time copy 200 _(i) is returned (at block 916) touse for the recovery volume 130. The final recovery volume 130 may beapplied to the source data, e.g., volume 104 _(i), to return to thepoint-in-time of the final recovery volume 130 comprising a most recenttime at which the source data had valid data.

With the operations of FIGS. 9a and 9b , the recovery volume may berolled backward and forward iteratively to determine a point-in-timecopy for a most current point-in-time having valid data. In alternativeembodiments, other operations may be used to estimate the most currentpoint-in-time copy having valid data, such as performing the iterativeoperations of FIGS. 9a and 9b for a limited number of times beforeselecting the last valid point-on-time copy to use for the roll-backoperation. Alternatively, other selection techniques may be used toselect one of the point-in-time copies to use to roll-back the sourcestorage 102 to a point where there is valid data.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The computational components of FIG. 1, including the storage controller100 and host 106 may be implemented in one or more computer systems,such as the computer system 1002 shown in FIG. 10. Computersystem/server 1002 may be described in the general context of computersystem executable instructions, such as program modules, being executedby a computer system. Generally, program modules may include routines,programs, objects, components, logic, data structures, and so on thatperform particular tasks or implement particular abstract data types.Computer system/server 1002 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 10, the computer system/server 1002 is shown in theform of a general-purpose computing device. The components of computersystem/server 1002 may include, but are not limited to, one or moreprocessors or processing units 1004, a system memory 1006, and a bus1008 that couples various system components including system memory 1006to processor 1004. Bus 1008 represents one or more of any of severaltypes of bus structures, including a memory bus or memory controller, aperipheral bus, an accelerated graphics port, and a processor or localbus using any of a variety of bus architectures. By way of example, andnot limitation, such architectures include Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server 1002 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 1002, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 1006 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1010 and/orcache memory 1012. Computer system/server 1002 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 1013 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 1008 by one or more datamedia interfaces. As will be further depicted and described below,memory 1006 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 1014, having a set (at least one) of program modules1016, may be stored in memory 1006 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. The components of the computer 1002 may beimplemented as program modules 1016 which generally carry out thefunctions and/or methodologies of embodiments of the invention asdescribed herein. The systems of FIG. 1 may be implemented in one ormore computer systems 1002, where if they are implemented in multiplecomputer systems 1002, then the computer systems may communicate over anetwork.

Computer system/server 1002 may also communicate with one or moreexternal devices 1018 such as a keyboard, a pointing device, a display1020, etc.; one or more devices that enable a user to interact withcomputer system/server 1002; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 1002 to communicate withone or more other computing devices. Such communication can occur viaInput/Output (I/O) interfaces 1022. Still yet, computer system/server1002 can communicate with one or more networks such as a local areanetwork (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 1024. As depicted,network adapter 1024 communicates with the other components of computersystem/server 1002 via bus 1008. It should be understood that althoughnot shown, other hardware and/or software components could be used inconjunction with computer system/server 1002. Examples, include, but arenot limited to: microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims herein after appended.

1-24. (canceled)
 25. A computer program product for managing point-in-time copies of a source storage, wherein the computer program product comprises a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause operations, the operations comprising: copying point-in-time data of source data to a backward log storage; copying point-in-time data in recovery source data, comprising the source data as of a previous point-in-time, to a forward log storage; applying the point-in-time data in the backward log storage as of a backward point-in-time to the recovery source data copied to the forward log storage to roll back the source data to the backward point-in-time; and applying the point-in-time data in the forward log storage to the recovery source data to roll forward the recovery source data to a forward point-in-time subsequent to the backward point-in-time.
 26. The computer program product of claim 25, wherein the operations further comprise: receiving writes to the source data, wherein the point-in-time data of the source data is copied to the backward log storage before updating the source data with the received writes.
 27. The computer program product of claim 25, wherein the operations further comprise: before applying the point-in-time data from the backward log storage, copying point-in-time data in the recovery source data, to be updated by the point-in-time data from the backward log storage, to the forward log storage.
 28. The computer program product of claim 25, wherein the backward log storage stores point-in-time data for multiple point-in-time copies of the source data at different point-in-times.
 29. The computer program product of claim 25, wherein for each instance of the point-in-time data copied to the backward log storage, generating metadata indicating a source data location in the source data from which the point-in-time data was copied, wherein the applying the backward log storage to roll-back the source data comprises copying the point-in-time data from the backward log storage to the source data location in the recovery source data indicated in metadata, and wherein, for each instance of the point-in-time data copied to the forward log storage, metadata is provided indicating a source data location in the source data from which the point-in-time data was copied, wherein the applying the forward log storage to roll-forward the recovery source data comprises copying the point-in-time data from the forward log storage to the source data location in the recovery source data indicated in metadata.
 30. The computer program product of claim 25, wherein the point-in-time data is written to the backward log storage at sequential data locations in an order in which the point-in-time data was updated at the source data, wherein the applying the backward log storage to roll-back the recovery source data comprises applying the point-in-time data from a most recent written location in the backward log storage, backward through sequential locations through a selected backward point-in-time copy prior to a current point-in-time of the source data, wherein the point-in-time data is written to the forward log storage at sequential data locations in an order in which the point-in-time data was rolled back at the recovery source data.
 31. The computer program product of claim 25, wherein the operations further comprise: for each point-in-time copy of a plurality of point-in-time copies, including in backward recovery metadata an entry including a first location and a last location in the backward log storage having point-in-time data for the point-in-time copy, wherein the applying the backward log storage to roll-back the source data comprises copying the point-in-time data to the recovery source data from the first location through the last location in the backward log storage indicated in the entry in the backward recovery metadata for each point-in-time copy used to roll-back the source data in the recovery source data.
 32. A system for managing point-in-time copies of a source storage, comprising: a processor; and a computer readable storage medium having program instructions embodied therewith, the program instructions executable by the processor to cause operations, the operations comprising: copying point-in-time data of source data to a backward log storage; copying point-in-time data in recovery source data, comprising the source data as of a previous point-in-time, to a forward log storage; applying the point-in-time data in the backward log storage as of a backward point-in-time to the recovery source data copied to the forward log storage to roll back the source data to the backward point-in-time; and applying the point-in-time data in the forward log storage to the recovery source data to roll forward the recovery source data to a forward point-in-time subsequent to the backward point-in-time.
 33. The system of claim 32, wherein the operations further comprise: receiving writes to the source data, wherein the point-in-time data of the source data is copied to the backward log storage before updating the source data with the received writes.
 34. The system of claim 32, wherein the operations further comprise: before applying the point-in-time data from the backward log storage, copying point-in-time data in the recovery source data, to be updated by the point-in-time data from the backward log storage, to the forward log storage.
 35. The system of claim 32, wherein the backward log storage stores point-in-time data for multiple point-in-time copies of the source data at different point-in-times.
 36. The system of claim 32, wherein for each instance of the point-in-time data copied to the backward log storage, generating metadata indicating a source data location in the source data from which the point-in-time data was copied, wherein the applying the backward log storage to roll-back the source data comprises copying the point-in-time data from the backward log storage to the source data location in the recovery source data indicated in metadata, and wherein, for each instance of the point-in-time data copied to the forward log storage, metadata is provided indicating a source data location in the source data from which the point-in-time data was copied, wherein the applying the forward log storage to roll-forward the recovery source data comprises copying the point-in-time data from the forward log storage to the source data location in the recovery source data indicated in metadata.
 37. The system of claim 32, wherein the point-in-time data is written to the backward log storage at sequential data locations in an order in which the point-in-time data was updated at the source data, wherein the applying the backward log storage to roll-back the recovery source data comprises applying the point-in-time data from a most recent written location in the backward log storage, backward through sequential locations through a selected backward point-in-time copy prior to a current point-in-time of the source data, wherein the point-in-time data is written to the forward log storage at sequential data locations in an order in which the point-in-time data was rolled back at the recovery source data.
 38. The system of claim 32, wherein the operations further comprise: for each point-in-time copy of a plurality of point-in-time copies, including in backward recovery metadata an entry including a first location and a last location in the backward log storage having point-in-time data for the point-in-time copy, wherein the applying the backward log storage to roll-back the source data comprises copying the point-in-time data to the recovery source data from the first location through the last location in the backward log storage indicated in the entry in the backward recovery metadata for each point-in-time copy used to roll-back the source data in the recovery source data.
 39. A method for managing point-in-time copies of a source storage, comprising: copying point-in-time data of source data to a backward log storage; copying point-in-time data in recovery source data, comprising the source data as of a previous point-in-time, to a forward log storage; applying the point-in-time data in the backward log storage as of a backward point-in-time to the recovery source data copied to the forward log storage to roll back the source data to the backward point-in-time; and applying the point-in-time data in the forward log storage to the recovery source data to roll forward the recovery source data to a forward point-in-time subsequent to the backward point-in-time.
 40. The method of claim 39, further comprising: receiving writes to the source data, wherein the point-in-time data of the source data is copied to the backward log storage before updating the source data with the received writes.
 41. The method of claim 39, further comprising: before applying the point-in-time data from the backward log storage, copying point-in-time data in the recovery source data, to be updated by the point-in-time data from the backward log storage, to the forward log storage.
 42. The method of claim 39, wherein the backward log storage stores point-in-time data for multiple point-in-time copies of the source data at different point-in-times.
 43. The method of claim 39, wherein for each instance of the point-in-time data copied to the backward log storage, generating metadata indicating a source data location in the source data from which the point-in-time data was copied, wherein the applying the backward log storage to roll-back the source data comprises copying the point-in-time data from the backward log storage to the source data location in the recovery source data indicated in metadata, and wherein, for each instance of the point-in-time data copied to the forward log storage, metadata is provided indicating a source data location in the source data from which the point-in-time data was copied, wherein the applying the forward log storage to roll-forward the recovery source data comprises copying the point-in-time data from the forward log storage to the source data location in the recovery source data indicated in metadata.
 44. The method of claim 39, wherein the point-in-time data is written to the backward log storage at sequential data locations in an order in which the point-in-time data was updated at the source data, wherein the applying the backward log storage to roll-back the recovery source data comprises applying the point-in-time data from a most recent written location in the backward log storage, backward through sequential locations through a selected backward point-in-time copy prior to a current point-in-time of the source data, wherein the point-in-time data is written to the forward log storage at sequential data locations in an order in which the point-in-time data was rolled back at the recovery source data. 